<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8" />
		<title>3.模拟一个简单的数据代理</title>
	</head>
	<body>
		 <script type="text/javascript" >
				let vm = {
					_data:{
						name:'atguigu',
						address:'宏福科技园'
					}
				}

				Object.defineProperty(vm,'name',{
					get(){
						return vm._data.name
					},
					set(value){
						vm._data.name = value
					}
				})

				console.log(vm.name)

		 </script>
	</body>
</html>